package com.springboot.cloud.gateway.web.service;

import org.springframework.cloud.gateway.route.RouteDefinition;
import reactor.core.publisher.Mono;

import java.util.Collection;
/**
 * <p> 路由 </p>
 *
 * @author Bertram
 * @since 7/15/2019 10:43 PM
 */
public interface RouteService {

    /**
     * 获取所有路由
     * @return
     */
    Collection<RouteDefinition> getRouteDefinitions();

    /**
     * 添加路由
     * @param routeDefinitionMono
     * @return
     */
    Mono<Void> save(Mono<RouteDefinition> routeDefinitionMono);

    /**
     * 删除路由
     * @param routeId
     * @return
     */
    Mono<Void> delete(Mono<String> routeId);
}
